package com.engine.modules.ytht.service;

import com.engine.modules.ytht.entity.FieldBlockUpdateResultEntity;
import com.engine.modules.ytht.entity.PlotInfoEntity;
import org.springframework.cache.annotation.Cacheable;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;


public interface FieldBlockBindingService {


    /**
     * @param z,x,y     切片号
     * @param pac 组名
     * @Descriptiont TODO 通过PAC组查询矢量切片（合并后切片，组中的表结构必须一致）
     * @Exception SystemTableException 系统表异常
     * @Return 切片二进制数据
    */
    public byte[] selectPacUnionTileByXYZ(int z, int x, int y, String pac);

    public byte[] selectOverwisePacUnionTileByXYZ(int z, int x, int y, String tablePac);

    public List<Map<String, Object>> selectGroupGeojsonByFBId(String fbId, String groupName);

    public List<Map<String, Object>> selectGroupGeojsonByTfIdc(String Tfidc, String groupName, String tablePac);

    public List<Map<String, Object>> selectGroupGeojsonBycbjyqztidcard(String Tfidc, String groupName, String tablePac);

    public Map<String, Object> selectGroupDataByFBId(String fbId, String groupName);

    public String UpdateGroupGeneralDataByEntity(PlotInfoEntity lietEntity, String groupName)
            throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    public String selectIdByFieldBlockNo(String fieldBlockNo);

    /**
     * @Description 实体类更新数据表组（含缓存更新）
     * @param lietEntity
     * @param groupName
     * @Return
     */
    public List<String> UpdateGroupGeneralDataByMutiEntity(List<PlotInfoEntity> lietEntity, String groupName)
            throws IllegalAccessException, NoSuchMethodException, InvocationTargetException ;

    public FieldBlockUpdateResultEntity insertByGeojson(String tablePac,String geoJson, String groupName);

    public FieldBlockUpdateResultEntity updateByGeojson(String geoJson, String groupName);

    public String deleteByFbIdLogic(String fbId, String groupName);

    public String deleteByFbId(String fbId, String groupName);

    public List<String> getTableName(String tablePac,String groupName);
}
